package versionControl.aspectj.library;

public abstract aspect Delete {
	abstract pointcut teardown(Versioned actualObj);
	
	before(Versioned actualObj): teardown(actualObj) && (!within(versionControl.aspectj.library.*))
	&& (!cflowbelow(teardown(Object))) 
	{
		// TODO: check implementation 
		for (Versioned version : actualObj.getVersions().values())
			actualObj.deleteVersion(version.getVersionID());
	}	
}